package fiarproject;

/***
 * Class contains x,y co-ordinate pair representing a position on the board
 */
public class Pair {
     private final int row;
     private final int column;

    /***
     *
      * @param row x position
     * @param column y position
     */
    public Pair(int row, int column) {
         this.row = row;
         this.column = column;
     }

    /***
     *  Row getter
      * @return row (x) value
     */
    public int getRow() {
         return row;
     }

    /***
     * Column getter
     * @return column (y) value
     */
     public int getColumn() {
         return column;
     }

    /***
     *
      * @param p pair to compare to
     *  @return true if pairs x and co-ordinates are equivalent
     */
    public boolean equals(Pair p) {
         return row==p.getRow()&&column==p.getColumn();
     }

 }

